home *** CD-ROM | disk | FTP | other *** search
Wrap
; ----------------------------------------------------- ; Peace and Protection (by misspai) ; ----------------------------------------------------- ; Main (normal) aliases ; (Final section) ; ----------------------------------------------------- ; Blacklist ; ----------------------------------------------------- black { set %.+bb.speak $true | set %.+bb.speak1st $true if ($_ischan($1)) { set %.bb.chan $1 | set %.bb.chd $1 | set %.bb.nick $2 | set %.bb.msg $3- } else { set %.bb.chan * | set %.bb.chd all channels | set %.bb.nick $1 | set %.bb.msg $2- } if ($gettok(%.bb.msg,1,32) == -q) { set %.bb.msg $gettok(%.bb.msg,2-,32) | set %.+bb.speak $false } elseif ($gettok(%.bb.msg,1,32) == -s) { set %.bb.msg $gettok(%.bb.msg,2-,32) | set %.+bb.speak $false | set %.+bb.speak1st $false } if (%.bb.nick == $null) _quickhelp /black if ($_not($_ismask(%.bb.nick))) { if (%+nick.complete.cmd) { if (%.bb.chan == $null) set %.bb.comp $_nickglob(%.bb.nick) else set %.bb.comp $_nickcomp(%.bb.nick,%.bb.chan) if (%.bb.comp != $null) set %.bb.nick %.bb.comp } if ($address(%.bb.nick,5) == $null) { if (%.bb.chan == *) _lookup %.bb.nick 3 black , $2- else _lookup %.bb.nick 3 black %.bb.chan , $3- } set %.bb.nick $_ppmask(%.bb.nick,3) } set %.bb.me $me $+ ! $+ %-my.address if (%.bb.nick iswm %.bb.me) _error Blacklist %col.att $+ cancelled- address of target matches your address! set %.bb.old $_ppblk(%.bb.nick) if ($gettok(%.bb.msg,1,32) == -r) { if (%.bb.old == $null) _error No existing blacklist entry for %.bb.nick $+ . elseif (%.+bb.speak1st) disps Removing blacklist entry for %col.target $+ %.bb.nick $+ set %.bb.num $_numtok(32,%.bb.old) :reml set %.bb.rem $gettok(%.bb.old,%.bb.num,32) _remblk %.bb.nick $+ > $+ %.bb.rem if ($_vd(.bb.num) > 0) goto reml _remblk %.bb.nick .ruser 1,black %.bb.nick return } if ($gettok(%.bb.msg,1,32) == -k) { _remblk %.bb.nick $+ > $+ %.bb.chan set %.bb.old $remtok(%.bb.old,%.bb.chan,32) if (%.bb.old == $null) { _remblk %.bb.nick .ruser 1,black %.bb.nick } else _writeblk %.bb.nick %.bb.old return } if ($gettok(%.bb.msg,1,32) == -w) { set %.bb.msg $gettok(%.bb.msg,2-,32) if ($findtok(%.bb.old,%.bb.chan,32) != $null) _error Blacklist entry for $+ %.bb.nick $+ on %.bb.chd already exists! } if (%.bb.msg == $null) set %.bb.msg Reason not given. if (%.+bb.speak1st) disps Blacklisting - %col.target $+ %.bb.nick $+ from %col.target $+ %.bb.chd $+ ( $+ %.bb.msg $+ ) _writeblk %.bb.nick $addtok(%.bb.old,%.bb.chan,32) _writeblk %.bb.nick $+ > $+ %.bb.chan %.bb.msg .auser 1,black %.bb.nick unset %.bb.targ set %.bb.chnm 1 :chloop if (%.bb.chan == *) set %.bb.ch $chan(%.bb.chnm) else set %.bb.ch %.bb.chan if (%.bb.ch == $null) { if ((%.bb.chnm == 1) && (%.+bb.speak)) disps (not on any channels, blacklist entry still made.) goto note } if ($me !isop %.bb.ch) { if (%.+bb.speak) disps (not an op on %col.target $+ %.bb.ch $+ , no kickbans performed, blacklist entry still made.) | goto next } set %.bb.num $ialchan(%.bb.nick,%.bb.ch,0) if (%.bb.num == 0) { if (%.+bb.speak) disps (no matching users on %col.target $+ %.bb.ch $+ , blacklist entry still made.) | goto next } fdop %.bb.ch %.bb.nick .raw mode %.bb.ch +b %.bb.nick if (%autounban.black > 0) tunban $calc(%autounban.black * 60) %.bb.ch %.bb.nick set %_recent.ban. [ $+ [ %.bb.ch ] ] %.bb.nick :nloop set %.bb.nk $ialchan(%.bb.nick,%.bb.ch,%.bb.num).nick kick %.bb.ch %.bb.nk $_blackmsg(Kicks,Blacklist,$_s2f(%.bb.chd),%.bb.nk,%.bb.nick,%.bb.msg) set %.bb.targ $addtok(%.bb.targ,%.bb.nk,44) if ($_vd(.bb.num) > 0) goto nloop :next if (%.bb.chan == *) { inc %.bb.chnm | goto chloop } :note if ((%.bb.targ != $null) && (%+notice.on.blacklist)) n %.bb.targ $_blackmsg(Misc,BlackNotice,$_s2f(%.bb.chd),%.bb.nk,%.bb.nick,%.bb.msg) } ; ----------------------------------------------------- ; Favorite channels ; ----------------------------------------------------- fav { if ($1 == $null) _quickhelp /fav if (c isin $1) { _writecfg misc Favorites | _remcfg Favorites | dispa List of favorite channels cleared. | return } if (s isin $1) { if ($2 != $null) _writecfg misc AutoFavorites $_o2tf($2) dispa Join favorites on signon: %col.info1 $+ $_tf2o($_ppcfg(Misc,AutoFavorites)) return } if ($_ppcfg(misc,favoritesbynet)) set %.fv.serv (for %pp.net $+ ) else unset %.fv.serv if ((a isin $1) || (r isin $1)) { if ($2 == $null) { if ($chan($active) != $active) _error You must use this in a channel or specify a target channel. set %.fv.targ $active } else set %.fv.targ $_patch($_s2c($2-)) set %.fv.num 1 :loop set %.fv.todo $gettok(%.fv.targ,%.fv.num,44) if (a isin $1) { if ($findtok($_favorites,%.fv.todo,44) != $null) dispa %col.target $+ %.fv.todo $+ is already in your favorites. %.fv.serv else { if (%.fv.serv == $null) { _writecfg misc Favorites $addtok($_favorites,%.fv.todo,44) | dispa %col.target $+ %.fv.todo $+ added to favorite channels. } else { _writecfg Favorites %pp.net $addtok($_favorites,%.fv.todo,44) | dispa %col.target $+ %.fv.todo $+ added to favorite channels. %.fv.serv } } } else { if ($findtok($_favorites,%.fv.todo,44) == $null) dispa %col.target $+ %.fv.todo $+ is not in your favorites. %.fv.serv else { if (%.fv.serv == $null) { _writecfg misc Favorites $remtok($_favorites,%.fv.todo,44) | dispa %col.target $+ %.fv.todo $+ removed from favorite channels. } else { _writecfg Favorites %pp.net $remtok($_favorites,%.fv.todo,44) | dispa %col.target $+ %.fv.todo $+ removed from favorite channels. %.fv.serv } } } if ($_vi(.fv.num) <= $_numtok(44,%.fv.targ)) goto loop } if (v isin $1) { if ($_favorites == $null) { dispa You have no favorite channels defined. %.fv.serv | return } else dispa Your current favorites: %.fv.serv %col.info1 $+ $_favorites %col.option $+ (F11 to join) } if (j isin $1) { if ($_favorites == $null) dispa You have no favorite channels to join. %.fv.serv else { dispa Joining favorite channels... %.fv.serv | j $_favorites $_keys($_favorites) } } } autoj fav j ; ----------------------------------------------------- ; Userlevel setting/modification ; ----------------------------------------------------- userlevel { if ($1 == $null) _quickhelp /userlevel set %.lvl.nick $_nickglob($1) if ((%.lvl.nick == $me) && (* !isin $1)) { disp %.lvl.nick == $me | _error Don't add yourself to the userlist, it's unneeded and will only cause problems. } if (($_ismask($1) == $false) && ($address(%.lvl.nick,5) == $null)) _lookup %.lvl.nick ! userlevel , $2- if (* isin $1) set %.lvl.addr $1 else { if (@ !isin %.lvl.nick) set %.lvl.addr $maddress($address(%.lvl.nick,5)) else set %.lvl.addr $maddress(%.lvl.nick) if (%.lvl.addr == $null) set %.lvl.addr $_ppmask(%.lvl.nick,3) } if ($2 == $null) { set %.lvl $level(%.lvl.addr) if ((%.lvl == 1) || (%.lvl == $null)) dispa %col.target $+ %.lvl.addr $+ has no current user level. else { set %.lvl.aka $readini $_ppdir $+ userlist.ini nick %.lvl.addr if ((%.lvl.nick != $null) && ($_not($_ismask(%.lvl.nick)))) { set %.lvl.addr %.lvl.nick $+ ( $+ %.lvl.addr $+ ) if (%.lvl.aka == %.lvl.nick) unset %.lvl.aka } if (%.lvl.aka == $null) dispa User level of %col.target $+ %.lvl.addr $+ - %col.dark $+ $_s2cs($_c2s($remove(%.lvl,=))) else dispa User level of %col.target $+ %.lvl.addr $+ (aka %col.target $+ %.lvl.aka $+ ) - %col.dark $+ $_s2cs($_c2s($remove(%.lvl,=))) } return } set %.lvl.act Adding set %.lvl $remove($remove($2,-),+) if (- isin $2) set %.lvl.act Removing if (%.lvl isnum) set %.lvl.act Setting if ($left(%.lvl,1) == v) set %.lvl voice elseif ($left(%.lvl,1) == s) set %.lvl send elseif ($left(%.lvl,3) == col) { set %.num $right(%.lvl,2) if (%.num !isnum) set %.num $right(%.lvl,1) if (%.num !isnum) set %.num 1 set %.lvl color $+ $_lpad(2,0,%.num) } elseif ($left(%.lvl,1) == c) set %.lvl chat elseif ($left(%.lvl,3) == nop) set %.lvl nopw elseif ($left(%.lvl,1) == n) set %.lvl nodcc elseif ($left(%.lvl,1) == @) set %.lvl $remove(%.lvl,@) elseif (op isin %.lvl) set %.lvl op elseif ((%.lvl !isnum) || (%.lvl !isnum 1-199)) _error Unknown or illegal user level $+ $2 $+ . if ($level(%.lvl.addr) == 1) { writeini $_ppdir $+ userlist.ini seen %.lvl.addr $ctime Added if ((* !isin $gettok($1,1,33)) && (? !isin $gettok($1,1,33))) writeini $_ppdir $+ userlist.ini nick %.lvl.addr $gettok($1,1,33) } elseif ($null == $readini $_ppdir $+ userlist.ini nick %.lvl.addr) { if ((* !isin $gettok($1,1,33)) && (? !isin $gettok($1,1,33))) writeini $_ppdir $+ userlist.ini nick %.lvl.addr $gettok($1,1,33) } if (%.lvl != op) { if ($3 != -q) dispa %.lvl.act user level of %col.info1 $+ %.lvl $+ for user address %col.target $+ %.lvl.addr $+ ... if (%.lvl.act != Removing) { set %.lvl.old $gettok($level(%.lvl.addr),1,44) if (($level(%.lvl.addr) == 1) && (%.lvl !isnum)) .auser -a 1 %.lvl.addr .auser -a %.lvl %.lvl.addr if ((%.lvl.old isnum) && (%.lvl isnum) && (%.lvl.old != %.lvl)) .ruser %.lvl.old %.lvl.addr } else .ruser %.lvl %.lvl.addr } else { if ($3 == -q) set %.lvl.chan $4 else set %.lvl.chan $3 if (%.lvl.chan == $null) { set %.lvl.chan Any | set %.lvl.tell all channels } else set %.lvl.tell %.lvl.chan if (%.lvl.act == Adding) set %.lvl.help (user can type /ctcp $me help for help) else unset %.lvl.help if ($3 != -q) dispa %.lvl.act ops on %col.info1 $+ %.lvl.tell $+ for user address %col.target $+ %.lvl.addr $+ ... %.lvl.help if (%.lvl.act == Adding) { if ($findtok(%opchan. [ $+ [ %.lvl.addr ] ] ,%.lvl.chan,32) != $null) { if ($3 != -q) return | _error $+ %.lvl.addr $+ already has ops access on %.lvl.tell $+ . } set %.lvl.old $gettok($level(%.lvl.addr),1,44) if ($level(%.lvl.addr) == 1) .auser -a 1 %.lvl.addr .auser -a %.lvl %.lvl.addr set %opchan. [ $+ [ %.lvl.addr ] ] %opchan. [ $+ [ %.lvl.addr ] ] %.lvl.chan if ((%oppass. [ $+ [ %.lvl.addr ] ] == $null) && (nopw !isin %.lvl.old)) dispa %col.target $+ %.lvl.addr $+ has not set a password; they should use /ctcp $me pass <newpass> } else { if (%.lvl.chan == any) { set %opchan. [ $+ [ %.lvl.addr ] ] | set %oppass. [ $+ [ %.lvl.addr ] ] | .ruser %.lvl %.lvl.addr } else { if ($findtok(%opchan. [ $+ [ %.lvl.addr ] ] ,%.lvl.chan,32) == $null) { if ($3 != -q) return | _error $+ %.lvl.addr $+ doesn't have ops access on %.lvl.tell $+ . } set %.lvl.old %opchan. [ $+ [ %.lvl.addr ] ] set %opchan. [ $+ [ %.lvl.addr ] ] $remtok(%.lvl.old,%.lvl.chan,32) if (%opchan. [ $+ [ %.lvl.addr ] ] == $null) { set %oppass. [ $+ [ %.lvl.addr ] ] | .ruser %.lvl %.lvl.addr } } } } if ($level(%.lvl.addr) == 1) { remini $_ppdir $+ userlist.ini seen %.lvl.addr remini $_ppdir $+ userlist.ini nick %.lvl.addr .ruser %.lvl.addr } if (%+nickcolors) { set %.match $ial(%.lvl.addr,0) if (%.match > 0) { :doc _nickcol $ial(%.lvl.addr,%.match).nick $ial(%.lvl.addr,%.match).addr $ial(%.lvl.addr,%.match) if ($_vd(.match) > 0) goto doc } } } lvl userlevel $1- user userlevel $1- userscan { if (($me !ison $1) && ($me !ison $active)) _error You must use this command in a channel or specify a target channel you are on. if ($me !ison $1) set %.us.chan $active | else set %.us.chan $1 if (%.us.chan isin %-ial.update) _error The IAL update is not completed yet on $+ %.us.chan $+ , please wait a few seconds and try again. dispa-div dispa Scanning %col.target $+ %.us.chan $+ for known users... set %.us.num $nick(%.us.chan,0) unset %.us.found :loop set %.us.nick $nick(%.us.chan,%.us.num) set %.us.addr $address(%.us.nick,5) if ((%.us.nick == $me) || (((%.us.addr == X!cservice@undernet.org) || (%.us.addr == W!cservice@undernet.org)) && (%pp.net == undernet))) goto next if (%.us.nick isnotify) { set %.us.notify %-+notifymatch. [ $+ [ %.us.nick ] ] if (%.us.notify) dispa $chr(160) %col.target $+ %.us.nick $+ is on your notify list, address verified elseif (%.us.notify == $null) dispa $chr(160) %col.target $+ %.us.nick $+ is on your notify list, no address check else dispa $chr(160) %col.target $+ %.us.nick $+ is on your notify list, address check failed inc %.us.found } set %.us.addr $maddress(%.us.addr) set %.us.lvl $level(%.us.addr) if (black isin %.us.lvl) { inc %.us.found | dispa $chr(160) %col.target $+ %.us.nick $+ is on your blacklist matching %col.info1 $+ %.us.addr } elseif (%.us.lvl != 1) { inc %.us.found set %.us.aka $readini $_ppdir $+ userlist.ini nick %.us.addr if ((%.us.aka == $null) || (%.us.aka == %.us.nick)) dispa $chr(160) %col.target $+ %.us.nick $+ is on your userlist matching %col.info1 $+ %.us.addr $+ , level %col.info1 $+ $remove(%.us.lvl,=) else dispa $chr(160) %col.target $+ %.us.nick $+ is on your userlist matching %col.info1 $+ %.us.addr $+ (aka %col.target $+ %.us.aka $+ ), level %col.info1 $+ $remove(%.us.lvl,=) } :next if ($_vd(.us.num) > 0) goto loop if (%.us.found > 0) dispa %col.att $+ %.us.found $+ recognized users found. else dispa %col.att $+ No $+ recognized users found. dispa-div } ; ----------------------------------------------------- ; DCC chat logins ; ----------------------------------------------------- login { if ($2 == $null) _quickhelp /login disp Logging in to %col.target $+ $1 $+ on port %col.target $+ $2 if ($longip($1) == $null) { .enable #-dcclogin | .dns $1 | set %-dcclogin $1 | set %-dccloginp $2 | halt } else _qlogin $1 $2 } irclogin { if ($1 == $null) _quickhelp /irclogin if ($2 == $null) set %-dccloginp 6667 else set %-dccloginp $2 disp Signing on to IRC server %col.target $+ $1 $+ on port %col.target $+ %-dccloginp if ($longip($1) == $null) { .enable #-dcclogin | .dns $1 | set %-dcclogin $1 | halt } else _qlogin $1 $2 } ; ----------------------------------------------------- ; Clear flood counters ; ----------------------------------------------------- defld dispa Clearing flood counters... | unset %-flood.* %-recd.* %-alert.* %-+waits.* %-mc.* %-once.* %-lastt.* %-desynch.* %-totalvers %-c.ctcp.* %-c.bytes.* %-soundfld.* %-leech.* %-clonejoin.* %-dban-halt %-showban %-cccfld.* %_edf.* | if (%_oldnick != $null) urn ; ----------------------------------------------------- ; "Nearby" server collection ; ----------------------------------------------------- nearserv { set %-ns.min 1 | set %-ns.max 2 if ($left($1,1) == <) set %-ns.max $remove($1,<) elseif ($left($2,1) == <) set %-ns.max $remove($2,<) if ($left($1,1) == >) set %-ns.min $remove($1,>) elseif ($left($2,1) == >) set %-ns.min $remove($2,>) if (%-ns.min !isnum) set %-ns.min 1 if (%-ns.max !isnum) set %-ns.max 2 if (%-ns.min > %-ns.max) { set %.tmp %-ns.min | set %-ns.min %-ns.max | set %-ns.max %.tmp } dispa Collecting nearby servers (hops %col.target $+ %-ns.min $+ to %col.target $+ %-ns.max $+ ) links | .enable #-nearserv | unset %_ns.found } ; ----------------------------------------------------- ; Kick stats ; ----------------------------------------------------- kickstat { if ($1 == $null) _quickhelp /kickstat if (. isin $1) set %.nk $1 else set %.nk $_nickglob($1) if (($2 == $null) || ($2 == c)) { if (($address(%.nk,5) == $null) && (. !isin %.nk)) _lookup %.nk * kickstat %.nk , $2 set %.mask $address(%.nk,3) } else set %.mask $2 set %.data $readini -n $_ppdir $+ kickstat.ini stats %.mask if (%.data == $null) dispa No kick data stored for %col.target $+ %.nk $+ . else { if (($3 == c) || (($3 == $null) && ($2 == c))) { dispa Brief kick data copied to clipboard. clipboard Seen %col.target $+ %.nk $+ ( $+ %.mask $+ ) suffer %col.info3 $+ $gettok(%.data,2,32) $+ kicks $+ / $+ %col.info3 $+ $gettok(%.data,3,32) $+ kickbans, last kick by %col.target $+ $gettok($gettok(%.data,6,32),1,33) $+ on %col.target $+ $gettok(%.data,5,32) $+ , reason " $+ %col.info1 $+ $_readprep($gettok(%.data,7-,32)) $+ " } else { dispa You've seen %col.target $+ %.nk $+ ( $+ %.mask $+ ) suffer %col.info3 $+ $gettok(%.data,2,32) $+ kicks and %col.info3 $+ $gettok(%.data,3,32) $+ kickbans set %.last $gettok(%.data,6,32) dispa Last kick by %col.target $+ $gettok(%.last,1,33) $+ ( $+ $gettok(%.last,2-,33) $+ ) on %col.target $+ $gettok(%.data,5,32) $+ , at $asctime($gettok(%.data,1,32)) dispa Kick reason was " $+ %col.info1 $+ $_readprep($gettok(%.data,7-,32)) $+ " (for $gettok(%.data,4,32) $+ ) } } } kstat kickstat $1- clrstat { if ($1 == $null) _quickhelp /clrstat if (. isin $1) set %.nk $1 else set %.nk $_nickglob($1) if ($2 == $null) { if (($address(%.nk,5) == $null) && (. !isin %.nk)) _lookup %.nk * clrstat %.nk , set %.mask $address(%.nk,3) } else set %.mask $2 remini $_ppdir $+ kickstat.ini stats %.mask dispa All kick data cleared for %col.target $+ %.nk $+ . } ; ----------------------------------------------------- ; Channel rejoin ; ----------------------------------------------------- rejoin { if ($1 == $null) { if ($chan($active) != $active) _error You must use this in a channel or specify a target channel. set %.rj.chan $active } else set %.rj.chan $1 set %.rj.key $chan(%.rj.chan).key .raw part %.rj.chan :rejoining .raw join %.rj.chan %.rj.key } cycle rejoin $1- ; ----------------------------------------------------- ; Fake joins ; ----------------------------------------------------- fakejoin { if ($1 == $null) _quickhelp /fakejoin set %.fake.to $_patch($1) set %.fake.num 8 :loop set %.fake.to %.fake.to $+ $gettok(...,$r(1,4),46) if ($_vd(.fake.num) > 0) goto loop set %.fake.to %.fake.to $+ .raw join %.fake.to .raw mode %.fake.to +int } ; ----------------------------------------------------- ; Channel info ; ----------------------------------------------------- chaninfo { if ($1 == $null) { if ($chan($active) != $active) _error You must use this in a channel or specify a target channel. set %.ci.chan $active } else set %.ci.chan $1 set %-cinfo.targ %-cinfo.targ %.ci.chan disprs %.ci.chan Retrieving %col.target $+ %.ci.chan $+ channel info... .raw mode %.ci.chan | .raw topic %.ci.chan | .raw names %.ci.chan } strictinfo { if ($1 == $null) { if ($chan($active) != $active) _error You must use this in a channel or specify a target channel. set %.ci.chan $lower($active) } else set %.ci.chan $lower($1) set %.ci.none $true disprs-div %.ci.chan disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] strict modes and topics- set %.ci.data %strictmode. [ $+ [ %.ci.chan ] ] | if (%.ci.data != $null) { disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] Mode strictly enforced- %col.dark $+ %.ci.data | unset %.ci.none } set %.ci.data %onopmode. [ $+ [ %.ci.chan ] ] | if (%.ci.data != $null) { disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] Mode set when opped- %col.dark $+ %.ci.data | unset %.ci.none } set %.ci.data %alonemode. [ $+ [ %.ci.chan ] ] | if (%.ci.data != $null) { disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] Mode set when alone- %col.dark $+ %.ci.data | unset %.ci.none } set %.ci.data %stricttopic. [ $+ [ %.ci.chan ] ] | if (%.ci.data != $null) { disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] Topic strictly enforced- %col.dark $+ %.ci.data | unset %.ci.none } set %.ci.data %onoptopic. [ $+ [ %.ci.chan ] ] | if (%.ci.data != $null) { disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] Topic set when opped- %col.dark $+ %.ci.data | unset %.ci.none } set %.ci.data %alonetopic. [ $+ [ %.ci.chan ] ] | if (%.ci.data != $null) { disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] Topic set when alone- %col.dark $+ %.ci.data | unset %.ci.none } if (%.ci.none) disprs %.ci.chan [[ $+ %col.info1 $+ %.ci.chan $+ ] has no modes or topics enforced or automatically set. disprs-div %.ci.chan } strict { if ($1 == $null) _quickhelp /strict set %.type Mode | set %.lvl strict | set %.desc strictly enforced if (t isin $1) set %.type Topic if (o isin $1) { set %.lvl onop | set %.desc set when opped } elseif (a isin $1) { set %.lvl alone | set %.desc set when alone on channel } if (($_ischan($2)) && ($left($2,1) != +)) { set %.chan $2 | set %.msg $3- } else { unset %.chan | set %.msg $2- } if ((%.type == topic) && (%.chan == $null)) _error You must specify a channel for topic settings. set %.var %.lvl $+ %.type if (%.chan != $null) { set %.var %.var $+ . $+ %.chan | set %.chan for %col.target $+ %.chan $+ } else set %.chan for %col.target $+ all channels if (%.msg == $null) { set % [ $+ [ %.var ] ] | disp %.type %.desc %.chan cleared (set to none) } else { set % [ $+ [ %.var ] ] %.msg | disp %.type %.desc %.chan set to - %col.dark $+ %.msg } } ; ----------------------------------------------------- ; Server pinging ; ----------------------------------------------------- sping { if ($1 == $null) _quickhelp /sping if (. !isin $1) { if ($2 == $null) { set %.targ $_nickglob($1) dispa Looking up server of %col.target $+ %.targ $+ ... set %-sping.user %-sping.user %.targ set %-+hidewhois. [ $+ [ %.targ ] ] $true .enable #-whoisno | .raw whois %.targ | halt } set %-servping. [ $+ [ $2 ] ] $ticks .raw time $2 disps Pinging server %col.info2 $+ $2 set %-sping.user $remtok(%-sping.user,$1,32) return } set %-servping. [ $+ [ $1 ] ] $ticks $2 .raw time $1 if ($2 == $null) disps Pinging server %col.info2 $+ $1 } ; ----------------------------------------------------- ; About window ; ----------------------------------------------------- about { set %.win1 @ $+ $chr(160) set %.win2 @ $+ $str($chr(160),2) set %.win3 @ $+ $str($chr(160),3) set %.hi $int($calc( [ $window(-3).h ] / 3)) set %.hi2 $calc(%.hi * 2) set %.wide 100 window %.win1 0 0 %.wide %.hi @About Arial 799 window %.win2 $calc( [ $window(-3).w ] - %.wide) %.hi %.wide %.hi @About Arial 799 window %.win3 0 %.hi2 %.wide %.hi @About Arial 799 :loop1 inc %.wide 40 if (%.wide > $window(-3).w) set %.wide $window(-3).w window %.win1 0 0 %.wide %.hi window %.win2 $calc( [ $window(-3).w ] - %.wide) %.hi %.wide %.hi window %.win3 0 %.hi2 %.wide %.hi if (%.wide < $window(-3).w) goto loop1 set %.char 1 aline %.win1 $chr(160) aline %.win2 $chr(160) aline %.win3 $chr(160) :loop2 rline %.win1 1 $right(Peaceááááá,%.char) rline %.win2 1 $right(andááááááá,%.char) rline %.win3 1 $right(Protection,%.char) if ($_vi(.char) < 11) goto loop2 set %.high 100 set %.left $calc( [ $window(-3).w ] - 240) window -l @@ %.left $calc( [ $window(-3).h ] - 100) 240 100 @About %font.basic :loop3 inc %.high 40 if (%.high > $window(-3).h) set %.high $window(-3).h window @@ %.left $int($calc( [ $window(-3).h ] - %.high)) 240 %.high if (%.high < $window(-3).h) goto loop3 .play -sc [ [ $_ppdir ] $+ ] about.txt 25 } ; ----------------------------------------------------- ; Ignore wrappers ; ----------------------------------------------------- ign if (- isin $1) { set %.opt $1 | set %.nick $_nickglob($2) | set %.num $3 } | else { set %.opt -inptk | set %.nick $_nickglob($1) | set %.num $2 } | if (%.nick == $null) _quickhelp /ign | if (%.num !isnum) set %.num 3 | set %.nick $_nickglob(%.nick) | if (($_ismask(%.nick)) || ($address(%.nick,5) != $null)) ignore %.opt $_ppmask(%.nick,%.num) | else ignore %.opt %.nick %.num unign set %.num $ignore(0) | if (%.num == 0) _error No recent ignores to unignore. | set %_lastunign $ignore(%.num) | ignore -r $ignore(%.num) reign if (%_lastunign == $null) _error No recent unignores to reignore. | ignore $1 %_lastunign $2- ; ----------------------------------------------------- ; "Random" nick changer ; ----------------------------------------------------- rn if (%_oldnick == $null) set %_oldnick $me | set %.nk $left($me,6) | :loop1 | if ($len(%.nk) < 9) { set %.nk %.nk $+ $r(0,9) | goto loop1 } | nick %.nk urn if (%_oldnick == $null) _error No previous nick to return to (use this after /rn to choose a random nick) | nick %_oldnick | unset %_oldnick ; ----------------------------------------------------- ; "All" wrapper ; ----------------------------------------------------- all { set %.cmd $remove($remove($remove($1,.),/),-) if (%.cmd == $null) { if (%+sounds.ame) dispa Sounds played in a channel will be played to ALL channel windows. else dispa Sounds played in a channel window will only play to that channel return } if ((%.cmd == on) || (%.cmd == yes)) { dispa Sounds played in a channel will be played to ALL channel windows. set %+sounds.ame $true | return } if ((%.cmd == off) || (%.cmd == no)) { dispa Sounds played in a channel window will only play to that channel set %+sounds.ame $false | return } set %.+allwrap $true $1- unset %.+allwrap } ; ----------------------------------------------------- ; Blacklist/userlist editing ; ----------------------------------------------------- blackedit { window -c @Blacklist window -l $_tabscale(21,34) @Blacklist $_winpos(7%,7%,7%,7%) @Blacklist %font.basic titlebar @Blacklist editor aline @Blacklist Scanning userlist... please wait... aline @Blacklist $chr(160) .timer -m 1 1 _be2 } _be2 { set %.ini $_ppdir $+ users.ini .save -ru %.ini set %.ini.num 1 :loop1 set %.ini.line $readini -n %.ini Users [ n $+ [ %.ini.num ] ] if (%.ini.line == $null) if ($null == $readini -n %.ini Users [ n $+ [ $calc(%.ini.num +1) ] ] ) goto done if ($left(%.ini.line,1) != $chr(59)) { set %.ini.lvl $gettok(%.ini.line,1,58) if (black isin %.ini.lvl) { set %.ini.addr $gettok(%.ini.line,2-,58) set %.ini.where $_ppblk(%.ini.addr) set %.ini.c $_numtok(32,%.ini.where) :loop2 set %.ini.w $gettok(%.ini.where,%.ini.c,32) set %.ini.i %.ini.addr $+ > $+ %.ini.w if (%.ini.w == *) set %.ini.w alláchannels aline @Blacklist %col.dark $+ %.ini.addr $+ $+ %col.target $+ %.ini.w $+ $+ %col.base $+ $_ppblk(%.ini.i) if ($_vd(.ini.c) > 0) goto loop2 } } inc %.ini.num goto loop1 :done rline @Blacklist 1 Select an entry and right-click for options. iline @Blacklist 3 Address Channel(s) Reason } useredit { window -c @Userlist window -l $_tabscale(8,28,32,42,54) @Userlist $_winpos(7%,7%,6%,6%) @Userlist %font.basic titlebar @Userlist editor aline @Userlist Scanning userlist... please wait... aline @Userlist $chr(160) .timer -m 1 1 _ue2 } _ue2 { set %.ini $_ppdir $+ users.ini .save -ru %.ini set %.ini.num 1 :loop set %.ini.line $readini -n %.ini Users [ n $+ [ %.ini.num ] ] if (%.ini.line == $null) if ($null == $readini -n %.ini Users [ n $+ [ $calc(%.ini.num +1) ] ] ) goto done if (($left(%.ini.line,1) != $chr(59)) && (: isin %.ini.line)) _ULaline $gettok(%.ini.line,2-,58) $_i($line(@Userlist,0)) inc %.ini.num goto loop :done rline @Userlist 1 Select an entry and right-click for options. iline @Userlist 2 (note: nickname is ONLY for reference and might NOT be the last seen or current nickname) iline @Userlist 4 Nickname Mask Level Op channels Added/seen window -b @Userlist } ; _ULaline *addr* line# (replaces) _ULaline { if (black isin $level($1)) return set %.ini.word $remove($gettok($level($1),2-,44),=) if (op isin %.ini.word) { set %.ini.word $remtok(%.ini.word,op,44) set %.ini.op %opchan. [ $+ [ $1 ] ] if ($findtok(%.ini.op,any,32) != $null) set %.ini.op $reptok(%.ini.op,any,alláchannels,32) set %.ini.op $_s2cs(%.ini.op) } else set %.ini.op $+ %col.misc $+ (none) set %.ini.word $_s2cs($_c2s(%.ini.word)) if (%.ini.word == $null) set %.ini.word $+ %col.misc $+ (none) set %.ini.name $readini $_ppdir $+ userlist.ini nick $1 if (%.ini.name == $null) set %.ini.name $+ %col.misc $+ (???) set %.ini.time $readini $_ppdir $+ userlist.ini seen $1 if (%.ini.time == $null) set %.ini.time $+ %col.misc $+ (???) else set %.ini.time $gettok(%.ini.time,2-,32) $gettok($duration($calc($ctime - $gettok(%.ini.time,1,32))),1-2,32) ago rline @Userlist $2 %col.target $+ %.ini.name $+ $+ %col.dark $+ $1 $+ $+ %col.target $+ $gettok($level($1),1,44) $+ $+ %col.target $+ %.ini.word $+ $+ %col.target $+ %.ini.op $+ $+ %col.dark $+ %.ini.time }